//
//  FWLoopCell.swift
//  PicturesLooper
//
//  Created by 范伟 on 16/3/13.
//  Copyright © 2016年 FanWei. All rights reserved.
//

import UIKit

class FWLoopCell: UICollectionViewCell {
    /// 图像路径
    var imagePath: String? {
        didSet {
            guard let imagePath = imagePath else {
                return
            }
        
            let data: NSData = NSData(contentsOfFile: imagePath)!
            imageView.image = UIImage(data: data)
        }
    }
    
    private let imageView: UIImageView = UIImageView()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        contentView.addSubview(imageView)
        imageView.frame = contentView.bounds
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
